/**
 * This class represents the Wagon object, and has a Pace attribute
 *
 * @author Akbar Dhannani
 * @version 1.0.0.0
 */
public class Wagon {
		private Pace pace;
		private Settler[] people;
		private Player player;
		
		
		/**
		 * The constructor creates an array of Settle objects and adds 4 settler objects to it
		 * It also sets the initial pace of the wagon
		 * @param one Settler one
		 * @param two Settler two
		 * @param three Settler three
		 * @param four Settler four
		 * @param pace Pace of the wagon
		 */
		public Wagon(Object one,Object two,Object three,Object four, Pace pace, Player player){
			people = new Settler[4];
			people[0] = (Settler)one;
			people[1]= (Settler)two;
			people[2]= (Settler)three;
			people[3]=(Settler)four;
			this.player = player;
			this.pace = pace;
		}
	
	/*
	 * Returns a string representation of the data stored in the wagon
	 * @return A string holding the data stored in the wagon. 
	 */
	public String toString(){
		String str = "";
		str += "Settler names and rations: ";
		for(Settler curr: people){
			str += "Setter: " + curr.getName() + " Ration: " + curr.getRation() + "\n";
		}
		str += "Pace: " + pace;
		str += "\nPlayer data: " + player.getName() + " Ration:" + player.getRation() + " Profession" + player.getProfession();
		return str;
	}
	
	/**
	 * Getter method for the player
	 * @return The player in the wagon
	 */
	public Player getPlayer(){
		return player;
	}
	
	/**
	 * Getter method for the array of settlers
	 * @return The array of settlers in the wagon
	 */
	public Settler[] getPeople(){
		return people;
	}
	
	/**
	 * Getter method for the pace
	 * @return The current pace of the journey
	 */
	public Pace getPace(){
		return pace;
	}
	
	/**
	 * Setter method for the pace
	 * @param pace The desired pace for the journey
	 */
	public void setPace(Pace pace){
		this.pace = pace;
	}

}


